!*******************************************************************
!> this module has all data and procedures storing problem vector
!  data including the rhs components as well as various cross
!  section data
!*******************************************************************
module class_dat

    implicit none
#include "finclude/petsc.h90"
    !> includes everything associated with the right hand side (sources)
    type, public :: rhsdat
        !> inhomogeneous (fixed) source
        Vec, dimension(:), pointer :: fixedSource
        !> homogeneous (i.e. fission) component = nuSigF
        Vec, dimension(:), pointer :: nuSigF
        !> the location and group dependent xi spectrum
        Vec, dimension(:), pointer :: xiSpect
        !> the location and group dependent scattering cross-section
        Vec, dimension(:,:), pointer :: sigScatter
    end type rhsdat

    !> included all coefficients of the problem for evaluation integral
    !  quanties (such as current responses)
    type, public :: coefdat
        !!> diffusion coefficient
        !double precision, dimension(:,:), allocatable :: diffCoef
        !> homogeneous (i.e. fission) component = nuSigF
        Vec, dimension(:), pointer ::  sigAbs
    end type coefdat

    !> flux
    type, public :: flux
        !> group wise vectors
        Vec, dimension(:), pointer ::  val
        !> x dimension (for easy manipulation)
        integer :: nx
        !> y dimension (for easy manipulation)
        integer :: ny
    end type flux

    PetscScalar :: keff

end module class_dat
